<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="cn.netjava.pojo.*"  %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>博客首页</title>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/blogpage.css">
	
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
  </head>
  
  <body>
    <div id="container">
       <div id="front">
           <jsp:include page="front.jsp" />          
       </div>
       
       
       <div id="main">
           <div id="left">
               <div id="top">top 
               </div>
                             
               <%List<Article> articleList =(List<Article>)request.getAttribute("lately6Article");
                 List<Article> articleListAboutLife =(List<Article>)request.getAttribute("lately6ArticleAboutLife");
                 List<Article> articleListAboutStudy =(List<Article>)request.getAttribute("lately6ArticleAboutStudy");
                 List<Article> articleListAboutWork =(List<Article>)request.getAttribute("lately6ArticleAboutWork");
                  %>
               
               <div class="column">
                    <div class="column_title">最新文章</div>                   
                    <div class="column_content">
                         <ul>                          
                          <%if(null!=articleList){ 
                           for(Article article:articleList){%>
                           <li><a href="showonearticle.cn?articleid=<%=article.getId() %>&&uid=<%=article.getUser().getId() %>"><%=article.getArticle_title() %></a></li>                          
                           <%} }%>
                         </ul>
                    </div>
               </div>
               
               <div class="column">
                    <div class="column_title">生活</div>
                    
                    <div class="column_content">
                        <ul>
                         <%if(null!=articleListAboutLife){
                         for(Article article:articleListAboutLife){ %>
                           <li><a href="showonearticle.cn?articleid=<%=article.getId() %>&&uid=<%=article.getUser().getId() %>"><%=article.getArticle_title() %></a></li>  
                         <%} }%>
                         </ul>
                    </div>
               </div>
               
               <div class="column">
                    <div class="column_title">学习</div>
                    
                    <div class="column_content">
                        <ul>
                         <%if(null!=articleListAboutStudy){
                           for(Article article:articleListAboutStudy){ %>
                           <li><a href="showonearticle.cn?articleid=<%=article.getId() %>&&uid=<%=article.getUser().getId() %>"><%=article.getArticle_title() %></a></li>  
                         <%} }%>
                         </ul>
                       
                    </div>
               </div>
               
               <div class="column">
                    <div class="column_title">工作</div>
                    
                    <div class="column_content">
                        <ul>
                          <%if(null!=articleListAboutWork){
                           for(Article article:articleListAboutWork){ %>
                           <li><a href="showonearticle.cn?articleid=<%=article.getId() %>&&uid=<%=article.getUser().getId() %>"><%=article.getArticle_title() %></a></li>  
                         <%} }%>
                         </ul>
                         
                    </div>
               </div>           
                          
           </div>
           
           <div id="right">
               <jsp:include page="right.jsp" />  
           </div>
       </div>
       
       
       <jsp:include page="../footer.jsp"></jsp:include>
    </div>
  </body>
</html>
